package tony.demo.web

import tony.core.utils.ifNull
import tony.web.WebContext.request
import tony.web.auth.jwt.JwtWebSession

/**
 * MonoWebSession is
 * @author tangli
 * @date 2025/09/23 09:36
 */
class MonoWebSession : JwtWebSession() {
    val tenantIdHeaderName: String = "X-Tenant-ID"
    val appIdHeaderName: String = "X-App-ID"
    override val tenantId: String
        get() = request.getHeader(tenantIdHeaderName).ifNull("")

    override val appId: String
        get() = request.getHeader(appIdHeaderName).ifNull("")
}
